<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>

    var abs = function(x){

        console.log("x=>"+x);

        for (var i = 0; i<arguments.length;i++){
            console.log(arguments[i]);
        }

        if (arguments.length==2){

        } else if(arguments.length==3){

        }

        if(x>=0){
            return x;
        }else{
            return -x;
        }

    }


</script>


</body>
</html>